#include "myline.h"
#include<QMainWindow>
MyLine::MyLine()
{
    lastPoint.setX(0);
    lastPoint.setY(0);
    curPoint.setX(0);
    curPoint.setY(0);
}
MyLine::MyLine(QPointF p1, QPointF p2):
    lastPoint(p1),
    curPoint(p2)
{
}
void MyLine::LineSeg()
{
    bDraw = false;
    bSelLine = false;
    bSelStarPt = false;
    bSelEndPt = false;
}
MyLine::~MyLine()
{

}
QPointF MyLine::GetCurP(){
    return curPoint;
}
QPointF MyLine::GetLastP(){
    return  lastPoint;
}
void MyLine::SetCurPossition(QPointF cp)
{
    curPoint = cp;
}
void MyLine::SetLastPosition(QPointF lp)
{
    lastPoint = lp;
}
QLineF MyLine::MakeLine()
{
    QLineF temline(lastPoint,curPoint);
    return temline;
}
